package com.tengju.bff.interfaces.covercharge.intf;


import com.idanchuang.component.base.JsonResult;
import com.tengju.bff.interfaces.covercharge.dto.ProfitSettleQueryReqDTO;
import com.tengju.bff.interfaces.covercharge.dto.ProfitSettleReqDTO;
import com.tengju.bff.interfaces.covercharge.dto.ProfitSettleDetailReqDTO;
import com.tengju.bff.interfaces.covercharge.dto.ServiceDealResDTO;
import com.tengju.bff.interfaces.shared.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;

/**
 * @author liang_shi
 * @date 2020/7/31 10:35
 * @description 收益结算服务
 */
//@Api(value = "/api/profit", tags = "收益结算服务")
//@RequestMapping(path = "/api/profit")
//@FeignClient(value = "covercharge-service")
public interface    IProfitSettleProvider {

    /**
     * 清结算
     * <p>
     * 会员提供数据过来，->可提现货款 + 服务费操作
     *
     * @param reqVo 处理数据
     * @return 结果
     */
    @ApiOperation(value = "汇总清结算", notes = "汇总清结算")
    @PostMapping(value = "/settle", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ApiResponse<ServiceDealResDTO> clearSettlement(@RequestBody @Valid ProfitSettleReqDTO reqVo);


    /**
     * 明细清结算
     * <p>
     * 会员提供数据过来，->可提现货款 + 服务费操作
     *
     * @param reqVo 处理数据
     * @return 结果
     */
    @ApiOperation(value = "明细清结算", notes = "明细清结算")
    @PostMapping(value = "/detail/settle", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ApiResponse<ServiceDealResDTO> clearSettlementByDetail(@RequestBody ProfitSettleDetailReqDTO reqVo);

    /**
     * 清结算结果查询
     *
     * @param reqDTO 请求
     * @return 结果
     */
    @ApiOperation(value = "清结算结果查询", notes = "清结算结果查询")
    @PostMapping(value = "/query/settle", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ApiResponse<ServiceDealResDTO> queryClearSettlementResult(@RequestBody ProfitSettleQueryReqDTO reqDTO);


}
